package com.yuw.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yuw.bean.AdminBean;
import com.yuw.dao.IAdminDao;
import com.yuw.service.IAdminService;

@Service("adminS")
public class AdminService implements IAdminService {
	/**
	 * spring使用依赖注入进行实例化处理
	 */
	@Resource
	private IAdminDao adminD;

	@Override
	public boolean isLogined(AdminBean adminB) {
		// 调用到层进行数据库查询验证
		List<AdminBean> lstAdmins = adminD.selectUsersInfo4Login(adminB);
		// 判定是否验证成功
		if (lstAdmins != null && lstAdmins.size() > 0) {
			// 登录验证成功
			return true;
		} else {
			return false;
		}
	}

}
